package net.martinimix.domain.payment;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Calendar;

/**
 * Provides a payment transaction.
 * 
 * @author Scott Rossillo
 *
 */
public class PaymentTransaction implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	public static final String TYPE_AUTHORIZATION = "AUT";
	public static final String TYPE_CAPTURE = "BIL";
	public static final String TYPE_VOID = "ACA";
	public static final String TYPE_ORDER = "ORD";
	
	public static final String STATUS_SUCCESS = "S";
	public static final String STATUS_FAILURE = "F";
	
	/**
	 * @@BusinessObjectProperty("ptx_id")
	 */
	private Long id;
	
	/**
	 * @@BusinessObjectProperty("ptx_pay_id")
	 */
	private Long paymentId;
	
	/**
	 * @@BusinessObjectProperty("transDate")
	 */
	private Calendar date;
	
	/**
	 *  @@BusinessObjectProperty("transAmt")
	 */
	private BigDecimal amount;
	
	/**
	 * @@BusinessObjectProperty("currency_cd")
	 */
	private String currencyCode;
	
	/**
	 * @@BusinessObjectProperty("transRefNum")
	 */
	private String requestId;
		
	/**
	 * @@BusinessObjectProperty("bankAuth") 
	 */
	private String bankAuthorization;
	
	/**
	 * @@BusinessObjectProperty("status_cd")
	 */
	private String statusCode;
	
	/**
	 * @@BusinessObjectProperty("response_cd")
	 */
	private String responseCode;
	
	/**
	 * @@BusinessObjectProperty("transType")
	 */
	private String typeCode;
	
	/**
	 * @@BusinessObjectProperty("merchant") 
	 */
	private String merchantId;
	
	/**
	 * Creates a new payment transaction.
	 */
	public PaymentTransaction() {
		this.currencyCode = "USD";
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getPaymentId() {
		return paymentId;
	}

	public void setPaymentId(Long paymentId) {
		this.paymentId = paymentId;
	}

	public Calendar getDate() {
		return date;
	}

	public void setDate(Calendar date) {
		this.date = date;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public String getCurrencyCode() {
		return currencyCode;
	}

	public void setCurrencyCode(String currencyCode) {
		this.currencyCode = currencyCode;
	}

	public String getRequestId() {
		return requestId;
	}

	public void setRequestId(String requestId) {
		this.requestId = requestId;
	}

	public String getBankAuthorization() {
		return bankAuthorization;
	}

	public void setBankAuthorization(String bankAuthorization) {
		this.bankAuthorization = bankAuthorization;
	}

	public String getStatusCode() {
		return statusCode;
	}

	public void setStatusCode(String statusCode) {
		this.statusCode = statusCode;
	}

	public String getResponseCode() {
		return responseCode;
	}

	public void setResponseCode(String responseCode) {
		this.responseCode = responseCode;
	}

	public String getTypeCode() {
		return typeCode;
	}

	public void setTypeCode(String typeCode) {
		this.typeCode = typeCode;
	}

	public String getMerchantId() {
		return merchantId;
	}

	public void setMerchantId(String merchantId) {
		this.merchantId = merchantId;
	}
	
}
